/*
 * An wb_fpga_i2c_bus_device driver for fpga i2c device function
 *
 * Copyright (C) 2024 Micas Networks Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <linux/module.h>
#include <linux/io.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/platform_device.h>

#include <wb_i2c_ocores.h>
#include <fpga_i2c.h>

static int g_wb_fpga_i2c_debug = 0;
static int g_wb_fpga_i2c_error = 0;

module_param(g_wb_fpga_i2c_debug, int, S_IRUGO | S_IWUSR);
module_param(g_wb_fpga_i2c_error, int, S_IRUGO | S_IWUSR);

#define WB_FPGA_I2C_DEBUG_VERBOSE(fmt, args...) do {                                        \
    if (g_wb_fpga_i2c_debug) { \
        printk(KERN_INFO "[WB_FPGA_I2C][VER][func:%s line:%d]\r\n"fmt, __func__, __LINE__, ## args); \
    } \
} while (0)

#define WB_FPGA_I2C_DEBUG_ERROR(fmt, args...) do {                                        \
    if (g_wb_fpga_i2c_error) { \
        printk(KERN_ERR "[WB_FPGA_I2C][ERR][func:%s line:%d]\r\n"fmt, __func__, __LINE__, ## args); \
    } \
} while (0)

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data0 = {
    .adap_nr                    = 2,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x500,
    .i2c_filter                 = 0x504,
    .i2c_stretch                = 0x508,
    .i2c_ext_9548_exits_flag    = 0x50c,
    .i2c_ext_9548_addr          = 0x510,
    .i2c_ext_9548_chan          = 0x514,
    .i2c_in_9548_chan           = 0x518,
    .i2c_slave                  = 0x51c,
    .i2c_reg                    = 0x520,
    .i2c_reg_len                = 0x530,
    .i2c_data_len               = 0x534,
    .i2c_ctrl                   = 0x538,
    .i2c_status                 = 0x53c,
    .i2c_data_buf               = 0x580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x80,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data1 = {
    .adap_nr                    = 3,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x600,
    .i2c_filter                 = 0x604,
    .i2c_stretch                = 0x608,
    .i2c_ext_9548_exits_flag    = 0x60c,
    .i2c_ext_9548_addr          = 0x610,
    .i2c_ext_9548_chan          = 0x614,
    .i2c_in_9548_chan           = 0x618,
    .i2c_slave                  = 0x61c,
    .i2c_reg                    = 0x620,
    .i2c_reg_len                = 0x630,
    .i2c_data_len               = 0x634,
    .i2c_ctrl                   = 0x638,
    .i2c_status                 = 0x63c,
    .i2c_data_buf               = 0x680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x84,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data2 = {
    .adap_nr                    = 4,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x700,
    .i2c_filter                 = 0x704,
    .i2c_stretch                = 0x708,
    .i2c_ext_9548_exits_flag    = 0x70c,
    .i2c_ext_9548_addr          = 0x710,
    .i2c_ext_9548_chan          = 0x714,
    .i2c_in_9548_chan           = 0x718,
    .i2c_slave                  = 0x71c,
    .i2c_reg                    = 0x720,
    .i2c_reg_len                = 0x730,
    .i2c_data_len               = 0x734,
    .i2c_ctrl                   = 0x738,
    .i2c_status                 = 0x73c,
    .i2c_data_buf               = 0x780,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x88,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_i2c_bus_device_data3 = {
    .adap_nr                    = 5,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x800,
    .i2c_filter                 = 0x804,
    .i2c_stretch                = 0x808,
    .i2c_ext_9548_exits_flag    = 0x80c,
    .i2c_ext_9548_addr          = 0x810,
    .i2c_ext_9548_chan          = 0x814,
    .i2c_in_9548_chan           = 0x818,
    .i2c_slave                  = 0x81c,
    .i2c_reg                    = 0x820,
    .i2c_reg_len                = 0x830,
    .i2c_data_len               = 0x834,
    .i2c_ctrl                   = 0x838,
    .i2c_status                 = 0x83c,
    .i2c_data_buf               = 0x900,
    .i2c_data_buf_len           = 0x100,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x8c,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data0 = {
    .adap_nr                    = 6,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2c00,
    .i2c_filter                 = 0x2c04,
    .i2c_stretch                = 0x2c08,
    .i2c_ext_9548_exits_flag    = 0x2c0c,
    .i2c_ext_9548_addr          = 0x2c10,
    .i2c_ext_9548_chan          = 0x2c14,
    .i2c_in_9548_chan           = 0x2c18,
    .i2c_slave                  = 0x2c1c,
    .i2c_reg                    = 0x2c20,
    .i2c_reg_len                = 0x2c30,
    .i2c_data_len               = 0x2c34,
    .i2c_ctrl                   = 0x2c38,
    .i2c_status                 = 0x2c3c,
    .i2c_data_buf               = 0x2c80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data1 = {
    .adap_nr                    = 7,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2d00,
    .i2c_filter                 = 0x2d04,
    .i2c_stretch                = 0x2d08,
    .i2c_ext_9548_exits_flag    = 0x2d0c,
    .i2c_ext_9548_addr          = 0x2d10,
    .i2c_ext_9548_chan          = 0x2d14,
    .i2c_in_9548_chan           = 0x2d18,
    .i2c_slave                  = 0x2d1c,
    .i2c_reg                    = 0x2d20,
    .i2c_reg_len                = 0x2d30,
    .i2c_data_len               = 0x2d34,
    .i2c_ctrl                   = 0x2d38,
    .i2c_status                 = 0x2d3c,
    .i2c_data_buf               = 0x2d80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data2 = {
    .adap_nr                    = 8,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2e00,
    .i2c_filter                 = 0x2e04,
    .i2c_stretch                = 0x2e08,
    .i2c_ext_9548_exits_flag    = 0x2e0c,
    .i2c_ext_9548_addr          = 0x2e10,
    .i2c_ext_9548_chan          = 0x2e14,
    .i2c_in_9548_chan           = 0x2e18,
    .i2c_slave                  = 0x2e1c,
    .i2c_reg                    = 0x2e20,
    .i2c_reg_len                = 0x2e30,
    .i2c_data_len               = 0x2e34,
    .i2c_ctrl                   = 0x2e38,
    .i2c_status                 = 0x2e3c,
    .i2c_data_buf               = 0x2e80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000004,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data3 = {
    .adap_nr                    = 9,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x2f00,
    .i2c_filter                 = 0x2f04,
    .i2c_stretch                = 0x2f08,
    .i2c_ext_9548_exits_flag    = 0x2f0c,
    .i2c_ext_9548_addr          = 0x2f10,
    .i2c_ext_9548_chan          = 0x2f14,
    .i2c_in_9548_chan           = 0x2f18,
    .i2c_slave                  = 0x2f1c,
    .i2c_reg                    = 0x2f20,
    .i2c_reg_len                = 0x2f30,
    .i2c_data_len               = 0x2f34,
    .i2c_ctrl                   = 0x2f38,
    .i2c_status                 = 0x2f3c,
    .i2c_data_buf               = 0x2f80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000008,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data4 = {
    .adap_nr                    = 10,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3000,
    .i2c_filter                 = 0x3004,
    .i2c_stretch                = 0x3008,
    .i2c_ext_9548_exits_flag    = 0x300c,
    .i2c_ext_9548_addr          = 0x3010,
    .i2c_ext_9548_chan          = 0x3014,
    .i2c_in_9548_chan           = 0x3018,
    .i2c_slave                  = 0x301c,
    .i2c_reg                    = 0x3020,
    .i2c_reg_len                = 0x3030,
    .i2c_data_len               = 0x3034,
    .i2c_ctrl                   = 0x3038,
    .i2c_status                 = 0x303c,
    .i2c_data_buf               = 0x3080,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000010,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data5 = {
    .adap_nr                    = 11,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3100,
    .i2c_filter                 = 0x3104,
    .i2c_stretch                = 0x3108,
    .i2c_ext_9548_exits_flag    = 0x310c,
    .i2c_ext_9548_addr          = 0x3110,
    .i2c_ext_9548_chan          = 0x3114,
    .i2c_in_9548_chan           = 0x3118,
    .i2c_slave                  = 0x311c,
    .i2c_reg                    = 0x3120,
    .i2c_reg_len                = 0x3130,
    .i2c_data_len               = 0x3134,
    .i2c_ctrl                   = 0x3138,
    .i2c_status                 = 0x313c,
    .i2c_data_buf               = 0x3180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000020,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data6 = {
    .adap_nr                    = 12,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3200,
    .i2c_filter                 = 0x3204,
    .i2c_stretch                = 0x3208,
    .i2c_ext_9548_exits_flag    = 0x320c,
    .i2c_ext_9548_addr          = 0x3210,
    .i2c_ext_9548_chan          = 0x3214,
    .i2c_in_9548_chan           = 0x3218,
    .i2c_slave                  = 0x321c,
    .i2c_reg                    = 0x3220,
    .i2c_reg_len                = 0x3230,
    .i2c_data_len               = 0x3234,
    .i2c_ctrl                   = 0x3238,
    .i2c_status                 = 0x323c,
    .i2c_data_buf               = 0x3280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000040,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data7 = {
    .adap_nr                    = 13,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3300,
    .i2c_filter                 = 0x3304,
    .i2c_stretch                = 0x3308,
    .i2c_ext_9548_exits_flag    = 0x330c,
    .i2c_ext_9548_addr          = 0x3310,
    .i2c_ext_9548_chan          = 0x3314,
    .i2c_in_9548_chan           = 0x3318,
    .i2c_slave                  = 0x331c,
    .i2c_reg                    = 0x3320,
    .i2c_reg_len                = 0x3330,
    .i2c_data_len               = 0x3334,
    .i2c_ctrl                   = 0x3338,
    .i2c_status                 = 0x333c,
    .i2c_data_buf               = 0x3380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000080,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data8 = {
    .adap_nr                    = 14,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3400,
    .i2c_filter                 = 0x3404,
    .i2c_stretch                = 0x3408,
    .i2c_ext_9548_exits_flag    = 0x340c,
    .i2c_ext_9548_addr          = 0x3410,
    .i2c_ext_9548_chan          = 0x3414,
    .i2c_in_9548_chan           = 0x3418,
    .i2c_slave                  = 0x341c,
    .i2c_reg                    = 0x3420,
    .i2c_reg_len                = 0x3430,
    .i2c_data_len               = 0x3434,
    .i2c_ctrl                   = 0x3438,
    .i2c_status                 = 0x343c,
    .i2c_data_buf               = 0x3480,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000100,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data9 = {
    .adap_nr                    = 15,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3500,
    .i2c_filter                 = 0x3504,
    .i2c_stretch                = 0x3508,
    .i2c_ext_9548_exits_flag    = 0x350c,
    .i2c_ext_9548_addr          = 0x3510,
    .i2c_ext_9548_chan          = 0x3514,
    .i2c_in_9548_chan           = 0x3518,
    .i2c_slave                  = 0x351c,
    .i2c_reg                    = 0x3520,
    .i2c_reg_len                = 0x3530,
    .i2c_data_len               = 0x3534,
    .i2c_ctrl                   = 0x3538,
    .i2c_status                 = 0x353c,
    .i2c_data_buf               = 0x3580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000200,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data10 = {
    .adap_nr                    = 16,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3600,
    .i2c_filter                 = 0x3604,
    .i2c_stretch                = 0x3608,
    .i2c_ext_9548_exits_flag    = 0x360c,
    .i2c_ext_9548_addr          = 0x3610,
    .i2c_ext_9548_chan          = 0x3614,
    .i2c_in_9548_chan           = 0x3618,
    .i2c_slave                  = 0x361c,
    .i2c_reg                    = 0x3620,
    .i2c_reg_len                = 0x3630,
    .i2c_data_len               = 0x3634,
    .i2c_ctrl                   = 0x3638,
    .i2c_status                 = 0x363c,
    .i2c_data_buf               = 0x3680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000400,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data11 = {
    .adap_nr                    = 17,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3700,
    .i2c_filter                 = 0x3704,
    .i2c_stretch                = 0x3708,
    .i2c_ext_9548_exits_flag    = 0x370c,
    .i2c_ext_9548_addr          = 0x3710,
    .i2c_ext_9548_chan          = 0x3714,
    .i2c_in_9548_chan           = 0x3718,
    .i2c_slave                  = 0x371c,
    .i2c_reg                    = 0x3720,
    .i2c_reg_len                = 0x3730,
    .i2c_data_len               = 0x3734,
    .i2c_ctrl                   = 0x3738,
    .i2c_status                 = 0x373c,
    .i2c_data_buf               = 0x3780,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00000800,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data12 = {
    .adap_nr                    = 18,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3800,
    .i2c_filter                 = 0x3804,
    .i2c_stretch                = 0x3808,
    .i2c_ext_9548_exits_flag    = 0x380c,
    .i2c_ext_9548_addr          = 0x3810,
    .i2c_ext_9548_chan          = 0x3814,
    .i2c_in_9548_chan           = 0x3818,
    .i2c_slave                  = 0x381c,
    .i2c_reg                    = 0x3820,
    .i2c_reg_len                = 0x3830,
    .i2c_data_len               = 0x3834,
    .i2c_ctrl                   = 0x3838,
    .i2c_status                 = 0x383c,
    .i2c_data_buf               = 0x3880,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00001000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data13 = {
    .adap_nr                    = 19,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3900,
    .i2c_filter                 = 0x3904,
    .i2c_stretch                = 0x3908,
    .i2c_ext_9548_exits_flag    = 0x390c,
    .i2c_ext_9548_addr          = 0x3910,
    .i2c_ext_9548_chan          = 0x3914,
    .i2c_in_9548_chan           = 0x3918,
    .i2c_slave                  = 0x391c,
    .i2c_reg                    = 0x3920,
    .i2c_reg_len                = 0x3930,
    .i2c_data_len               = 0x3934,
    .i2c_ctrl                   = 0x3938,
    .i2c_status                 = 0x393c,
    .i2c_data_buf               = 0x3980,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00002000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data14 = {
    .adap_nr                    = 20,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3a00,
    .i2c_filter                 = 0x3a04,
    .i2c_stretch                = 0x3a08,
    .i2c_ext_9548_exits_flag    = 0x3a0c,
    .i2c_ext_9548_addr          = 0x3a10,
    .i2c_ext_9548_chan          = 0x3a14,
    .i2c_in_9548_chan           = 0x3a18,
    .i2c_slave                  = 0x3a1c,
    .i2c_reg                    = 0x3a20,
    .i2c_reg_len                = 0x3a30,
    .i2c_data_len               = 0x3a34,
    .i2c_ctrl                   = 0x3a38,
    .i2c_status                 = 0x3a3c,
    .i2c_data_buf               = 0x3a80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00004000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data15 = {
    .adap_nr                    = 21,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3b00,
    .i2c_filter                 = 0x3b04,
    .i2c_stretch                = 0x3b08,
    .i2c_ext_9548_exits_flag    = 0x3b0c,
    .i2c_ext_9548_addr          = 0x3b10,
    .i2c_ext_9548_chan          = 0x3b14,
    .i2c_in_9548_chan           = 0x3b18,
    .i2c_slave                  = 0x3b1c,
    .i2c_reg                    = 0x3b20,
    .i2c_reg_len                = 0x3b30,
    .i2c_data_len               = 0x3b34,
    .i2c_ctrl                   = 0x3b38,
    .i2c_status                 = 0x3b3c,
    .i2c_data_buf               = 0x3b80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00008000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data16 = {
    .adap_nr                    = 22,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3c00,
    .i2c_filter                 = 0x3c04,
    .i2c_stretch                = 0x3c08,
    .i2c_ext_9548_exits_flag    = 0x3c0c,
    .i2c_ext_9548_addr          = 0x3c10,
    .i2c_ext_9548_chan          = 0x3c14,
    .i2c_in_9548_chan           = 0x3c18,
    .i2c_slave                  = 0x3c1c,
    .i2c_reg                    = 0x3c20,
    .i2c_reg_len                = 0x3c30,
    .i2c_data_len               = 0x3c34,
    .i2c_ctrl                   = 0x3c38,
    .i2c_status                 = 0x3c3c,
    .i2c_data_buf               = 0x3c80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00010000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data17 = {
    .adap_nr                    = 23,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3d00,
    .i2c_filter                 = 0x3d04,
    .i2c_stretch                = 0x3d08,
    .i2c_ext_9548_exits_flag    = 0x3d0c,
    .i2c_ext_9548_addr          = 0x3d10,
    .i2c_ext_9548_chan          = 0x3d14,
    .i2c_in_9548_chan           = 0x3d18,
    .i2c_slave                  = 0x3d1c,
    .i2c_reg                    = 0x3d20,
    .i2c_reg_len                = 0x3d30,
    .i2c_data_len               = 0x3d34,
    .i2c_ctrl                   = 0x3d38,
    .i2c_status                 = 0x3d3c,
    .i2c_data_buf               = 0x3d80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00020000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data18 = {
    .adap_nr                    = 24,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3e00,
    .i2c_filter                 = 0x3e04,
    .i2c_stretch                = 0x3e08,
    .i2c_ext_9548_exits_flag    = 0x3e0c,
    .i2c_ext_9548_addr          = 0x3e10,
    .i2c_ext_9548_chan          = 0x3e14,
    .i2c_in_9548_chan           = 0x3e18,
    .i2c_slave                  = 0x3e1c,
    .i2c_reg                    = 0x3e20,
    .i2c_reg_len                = 0x3e30,
    .i2c_data_len               = 0x3e34,
    .i2c_ctrl                   = 0x3e38,
    .i2c_status                 = 0x3e3c,
    .i2c_data_buf               = 0x3e80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00040000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data19 = {
    .adap_nr                    = 25,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x3f00,
    .i2c_filter                 = 0x3f04,
    .i2c_stretch                = 0x3f08,
    .i2c_ext_9548_exits_flag    = 0x3f0c,
    .i2c_ext_9548_addr          = 0x3f10,
    .i2c_ext_9548_chan          = 0x3f14,
    .i2c_in_9548_chan           = 0x3f18,
    .i2c_slave                  = 0x3f1c,
    .i2c_reg                    = 0x3f20,
    .i2c_reg_len                = 0x3f30,
    .i2c_data_len               = 0x3f34,
    .i2c_ctrl                   = 0x3f38,
    .i2c_status                 = 0x3f3c,
    .i2c_data_buf               = 0x3f80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00080000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data20 = {
    .adap_nr                    = 26,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4000,
    .i2c_filter                 = 0x4004,
    .i2c_stretch                = 0x4008,
    .i2c_ext_9548_exits_flag    = 0x400c,
    .i2c_ext_9548_addr          = 0x4010,
    .i2c_ext_9548_chan          = 0x4014,
    .i2c_in_9548_chan           = 0x4018,
    .i2c_slave                  = 0x401c,
    .i2c_reg                    = 0x4020,
    .i2c_reg_len                = 0x4030,
    .i2c_data_len               = 0x4034,
    .i2c_ctrl                   = 0x4038,
    .i2c_status                 = 0x403c,
    .i2c_data_buf               = 0x4080,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00100000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data21 = {
    .adap_nr                    = 27,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4100,
    .i2c_filter                 = 0x4104,
    .i2c_stretch                = 0x4108,
    .i2c_ext_9548_exits_flag    = 0x410c,
    .i2c_ext_9548_addr          = 0x4110,
    .i2c_ext_9548_chan          = 0x4114,
    .i2c_in_9548_chan           = 0x4118,
    .i2c_slave                  = 0x411c,
    .i2c_reg                    = 0x4120,
    .i2c_reg_len                = 0x4130,
    .i2c_data_len               = 0x4134,
    .i2c_ctrl                   = 0x4138,
    .i2c_status                 = 0x413c,
    .i2c_data_buf               = 0x4180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00200000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data22 = {
    .adap_nr                    = 28,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4200,
    .i2c_filter                 = 0x4204,
    .i2c_stretch                = 0x4208,
    .i2c_ext_9548_exits_flag    = 0x420c,
    .i2c_ext_9548_addr          = 0x4210,
    .i2c_ext_9548_chan          = 0x4214,
    .i2c_in_9548_chan           = 0x4218,
    .i2c_slave                  = 0x421c,
    .i2c_reg                    = 0x4220,
    .i2c_reg_len                = 0x4230,
    .i2c_data_len               = 0x4234,
    .i2c_ctrl                   = 0x4238,
    .i2c_status                 = 0x423c,
    .i2c_data_buf               = 0x4280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00400000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data23 = {
    .adap_nr                    = 29,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4300,
    .i2c_filter                 = 0x4304,
    .i2c_stretch                = 0x4308,
    .i2c_ext_9548_exits_flag    = 0x430c,
    .i2c_ext_9548_addr          = 0x4310,
    .i2c_ext_9548_chan          = 0x4314,
    .i2c_in_9548_chan           = 0x4318,
    .i2c_slave                  = 0x431c,
    .i2c_reg                    = 0x4320,
    .i2c_reg_len                = 0x4330,
    .i2c_data_len               = 0x4334,
    .i2c_ctrl                   = 0x4338,
    .i2c_status                 = 0x433c,
    .i2c_data_buf               = 0x4380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x00800000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data24 = {
    .adap_nr                    = 30,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4400,
    .i2c_filter                 = 0x4404,
    .i2c_stretch                = 0x4408,
    .i2c_ext_9548_exits_flag    = 0x440c,
    .i2c_ext_9548_addr          = 0x4410,
    .i2c_ext_9548_chan          = 0x4414,
    .i2c_in_9548_chan           = 0x4418,
    .i2c_slave                  = 0x441c,
    .i2c_reg                    = 0x4420,
    .i2c_reg_len                = 0x4430,
    .i2c_data_len               = 0x4434,
    .i2c_ctrl                   = 0x4438,
    .i2c_status                 = 0x443c,
    .i2c_data_buf               = 0x4480,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x01000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data25 = {
    .adap_nr                    = 31,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4500,
    .i2c_filter                 = 0x4504,
    .i2c_stretch                = 0x4508,
    .i2c_ext_9548_exits_flag    = 0x450c,
    .i2c_ext_9548_addr          = 0x4510,
    .i2c_ext_9548_chan          = 0x4514,
    .i2c_in_9548_chan           = 0x4518,
    .i2c_slave                  = 0x451c,
    .i2c_reg                    = 0x4520,
    .i2c_reg_len                = 0x4530,
    .i2c_data_len               = 0x4534,
    .i2c_ctrl                   = 0x4538,
    .i2c_status                 = 0x453c,
    .i2c_data_buf               = 0x4580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x02000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data26 = {
    .adap_nr                    = 32,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4600,
    .i2c_filter                 = 0x4604,
    .i2c_stretch                = 0x4608,
    .i2c_ext_9548_exits_flag    = 0x460c,
    .i2c_ext_9548_addr          = 0x4610,
    .i2c_ext_9548_chan          = 0x4614,
    .i2c_in_9548_chan           = 0x4618,
    .i2c_slave                  = 0x461c,
    .i2c_reg                    = 0x4620,
    .i2c_reg_len                = 0x4630,
    .i2c_data_len               = 0x4634,
    .i2c_ctrl                   = 0x4638,
    .i2c_status                 = 0x463c,
    .i2c_data_buf               = 0x4680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x04000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data27 = {
    .adap_nr                    = 33,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4700,
    .i2c_filter                 = 0x4704,
    .i2c_stretch                = 0x4708,
    .i2c_ext_9548_exits_flag    = 0x470c,
    .i2c_ext_9548_addr          = 0x4710,
    .i2c_ext_9548_chan          = 0x4714,
    .i2c_in_9548_chan           = 0x4718,
    .i2c_slave                  = 0x471c,
    .i2c_reg                    = 0x4720,
    .i2c_reg_len                = 0x4730,
    .i2c_data_len               = 0x4734,
    .i2c_ctrl                   = 0x4738,
    .i2c_status                 = 0x473c,
    .i2c_data_buf               = 0x4780,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x08000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data28 = {
    .adap_nr                    = 34,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4800,
    .i2c_filter                 = 0x4804,
    .i2c_stretch                = 0x4808,
    .i2c_ext_9548_exits_flag    = 0x480c,
    .i2c_ext_9548_addr          = 0x4810,
    .i2c_ext_9548_chan          = 0x4814,
    .i2c_in_9548_chan           = 0x4818,
    .i2c_slave                  = 0x481c,
    .i2c_reg                    = 0x4820,
    .i2c_reg_len                = 0x4830,
    .i2c_data_len               = 0x4834,
    .i2c_ctrl                   = 0x4838,
    .i2c_status                 = 0x483c,
    .i2c_data_buf               = 0x4880,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x10000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data29 = {
    .adap_nr                    = 35,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4900,
    .i2c_filter                 = 0x4904,
    .i2c_stretch                = 0x4908,
    .i2c_ext_9548_exits_flag    = 0x490c,
    .i2c_ext_9548_addr          = 0x4910,
    .i2c_ext_9548_chan          = 0x4914,
    .i2c_in_9548_chan           = 0x4918,
    .i2c_slave                  = 0x491c,
    .i2c_reg                    = 0x4920,
    .i2c_reg_len                = 0x4930,
    .i2c_data_len               = 0x4934,
    .i2c_ctrl                   = 0x4938,
    .i2c_status                 = 0x493c,
    .i2c_data_buf               = 0x4980,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x20000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data30 = {
    .adap_nr                    = 36,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4a00,
    .i2c_filter                 = 0x4a04,
    .i2c_stretch                = 0x4a08,
    .i2c_ext_9548_exits_flag    = 0x4a0c,
    .i2c_ext_9548_addr          = 0x4a10,
    .i2c_ext_9548_chan          = 0x4a14,
    .i2c_in_9548_chan           = 0x4a18,
    .i2c_slave                  = 0x4a1c,
    .i2c_reg                    = 0x4a20,
    .i2c_reg_len                = 0x4a30,
    .i2c_data_len               = 0x4a34,
    .i2c_ctrl                   = 0x4a38,
    .i2c_status                 = 0x4a3c,
    .i2c_data_buf               = 0x4a80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x40000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data31 = {
    .adap_nr                    = 37,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4b00,
    .i2c_filter                 = 0x4b04,
    .i2c_stretch                = 0x4b08,
    .i2c_ext_9548_exits_flag    = 0x4b0c,
    .i2c_ext_9548_addr          = 0x4b10,
    .i2c_ext_9548_chan          = 0x4b14,
    .i2c_in_9548_chan           = 0x4b18,
    .i2c_slave                  = 0x4b1c,
    .i2c_reg                    = 0x4b20,
    .i2c_reg_len                = 0x4b30,
    .i2c_data_len               = 0x4b34,
    .i2c_ctrl                   = 0x4b38,
    .i2c_status                 = 0x4b3c,
    .i2c_data_buf               = 0x4b80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x78,
    .i2c_reset_on               = 0x80000000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data32 = {
    .adap_nr                    = 38,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4c00,
    .i2c_filter                 = 0x4c04,
    .i2c_stretch                = 0x4c08,
    .i2c_ext_9548_exits_flag    = 0x4c0c,
    .i2c_ext_9548_addr          = 0x4c10,
    .i2c_ext_9548_chan          = 0x4c14,
    .i2c_in_9548_chan           = 0x4c18,
    .i2c_slave                  = 0x4c1c,
    .i2c_reg                    = 0x4c20,
    .i2c_reg_len                = 0x4c30,
    .i2c_data_len               = 0x4c34,
    .i2c_ctrl                   = 0x4c38,
    .i2c_status                 = 0x4c3c,
    .i2c_data_buf               = 0x4c80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000001,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data33 = {
    .adap_nr                    = 39,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4d00,
    .i2c_filter                 = 0x4d04,
    .i2c_stretch                = 0x4d08,
    .i2c_ext_9548_exits_flag    = 0x4d0c,
    .i2c_ext_9548_addr          = 0x4d10,
    .i2c_ext_9548_chan          = 0x4d14,
    .i2c_in_9548_chan           = 0x4d18,
    .i2c_slave                  = 0x4d1c,
    .i2c_reg                    = 0x4d20,
    .i2c_reg_len                = 0x4d30,
    .i2c_data_len               = 0x4d34,
    .i2c_ctrl                   = 0x4d38,
    .i2c_status                 = 0x4d3c,
    .i2c_data_buf               = 0x4d80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000002,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data34 = {
    .adap_nr                    = 40,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4e00,
    .i2c_filter                 = 0x4e04,
    .i2c_stretch                = 0x4e08,
    .i2c_ext_9548_exits_flag    = 0x4e0c,
    .i2c_ext_9548_addr          = 0x4e10,
    .i2c_ext_9548_chan          = 0x4e14,
    .i2c_in_9548_chan           = 0x4e18,
    .i2c_slave                  = 0x4e1c,
    .i2c_reg                    = 0x4e20,
    .i2c_reg_len                = 0x4e30,
    .i2c_data_len               = 0x4e34,
    .i2c_ctrl                   = 0x4e38,
    .i2c_status                 = 0x4e3c,
    .i2c_data_buf               = 0x4e80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000004,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data35 = {
    .adap_nr                    = 41,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x4f00,
    .i2c_filter                 = 0x4f04,
    .i2c_stretch                = 0x4f08,
    .i2c_ext_9548_exits_flag    = 0x4f0c,
    .i2c_ext_9548_addr          = 0x4f10,
    .i2c_ext_9548_chan          = 0x4f14,
    .i2c_in_9548_chan           = 0x4f18,
    .i2c_slave                  = 0x4f1c,
    .i2c_reg                    = 0x4f20,
    .i2c_reg_len                = 0x4f30,
    .i2c_data_len               = 0x4f34,
    .i2c_ctrl                   = 0x4f38,
    .i2c_status                 = 0x4f3c,
    .i2c_data_buf               = 0x4f80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000008,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data36 = {
    .adap_nr                    = 42,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5000,
    .i2c_filter                 = 0x5004,
    .i2c_stretch                = 0x5008,
    .i2c_ext_9548_exits_flag    = 0x500c,
    .i2c_ext_9548_addr          = 0x5010,
    .i2c_ext_9548_chan          = 0x5014,
    .i2c_in_9548_chan           = 0x5018,
    .i2c_slave                  = 0x501c,
    .i2c_reg                    = 0x5020,
    .i2c_reg_len                = 0x5030,
    .i2c_data_len               = 0x5034,
    .i2c_ctrl                   = 0x5038,
    .i2c_status                 = 0x503c,
    .i2c_data_buf               = 0x5080,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000010,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data37 = {
    .adap_nr                    = 43,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5100,
    .i2c_filter                 = 0x5104,
    .i2c_stretch                = 0x5108,
    .i2c_ext_9548_exits_flag    = 0x510c,
    .i2c_ext_9548_addr          = 0x5110,
    .i2c_ext_9548_chan          = 0x5114,
    .i2c_in_9548_chan           = 0x5118,
    .i2c_slave                  = 0x511c,
    .i2c_reg                    = 0x5120,
    .i2c_reg_len                = 0x5130,
    .i2c_data_len               = 0x5134,
    .i2c_ctrl                   = 0x5138,
    .i2c_status                 = 0x513c,
    .i2c_data_buf               = 0x5180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000020,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data38 = {
    .adap_nr                    = 44,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5200,
    .i2c_filter                 = 0x5204,
    .i2c_stretch                = 0x5208,
    .i2c_ext_9548_exits_flag    = 0x520c,
    .i2c_ext_9548_addr          = 0x5210,
    .i2c_ext_9548_chan          = 0x5214,
    .i2c_in_9548_chan           = 0x5218,
    .i2c_slave                  = 0x521c,
    .i2c_reg                    = 0x5220,
    .i2c_reg_len                = 0x5230,
    .i2c_data_len               = 0x5234,
    .i2c_ctrl                   = 0x5238,
    .i2c_status                 = 0x523c,
    .i2c_data_buf               = 0x5280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000040,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data39 = {
    .adap_nr                    = 45,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5300,
    .i2c_filter                 = 0x5304,
    .i2c_stretch                = 0x5308,
    .i2c_ext_9548_exits_flag    = 0x530c,
    .i2c_ext_9548_addr          = 0x5310,
    .i2c_ext_9548_chan          = 0x5314,
    .i2c_in_9548_chan           = 0x5318,
    .i2c_slave                  = 0x531c,
    .i2c_reg                    = 0x5320,
    .i2c_reg_len                = 0x5330,
    .i2c_data_len               = 0x5334,
    .i2c_ctrl                   = 0x5338,
    .i2c_status                 = 0x533c,
    .i2c_data_buf               = 0x5380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000080,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data40 = {
    .adap_nr                    = 46,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5400,
    .i2c_filter                 = 0x5404,
    .i2c_stretch                = 0x5408,
    .i2c_ext_9548_exits_flag    = 0x540c,
    .i2c_ext_9548_addr          = 0x5410,
    .i2c_ext_9548_chan          = 0x5414,
    .i2c_in_9548_chan           = 0x5418,
    .i2c_slave                  = 0x541c,
    .i2c_reg                    = 0x5420,
    .i2c_reg_len                = 0x5430,
    .i2c_data_len               = 0x5434,
    .i2c_ctrl                   = 0x5438,
    .i2c_status                 = 0x543c,
    .i2c_data_buf               = 0x5480,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000100,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data41 = {
    .adap_nr                    = 47,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5500,
    .i2c_filter                 = 0x5504,
    .i2c_stretch                = 0x5508,
    .i2c_ext_9548_exits_flag    = 0x550c,
    .i2c_ext_9548_addr          = 0x5510,
    .i2c_ext_9548_chan          = 0x5514,
    .i2c_in_9548_chan           = 0x5518,
    .i2c_slave                  = 0x551c,
    .i2c_reg                    = 0x5520,
    .i2c_reg_len                = 0x5530,
    .i2c_data_len               = 0x5534,
    .i2c_ctrl                   = 0x5538,
    .i2c_status                 = 0x553c,
    .i2c_data_buf               = 0x5580,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000200,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data42 = {
    .adap_nr                    = 48,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5600,
    .i2c_filter                 = 0x5604,
    .i2c_stretch                = 0x5608,
    .i2c_ext_9548_exits_flag    = 0x560c,
    .i2c_ext_9548_addr          = 0x5610,
    .i2c_ext_9548_chan          = 0x5614,
    .i2c_in_9548_chan           = 0x5618,
    .i2c_slave                  = 0x561c,
    .i2c_reg                    = 0x5620,
    .i2c_reg_len                = 0x5630,
    .i2c_data_len               = 0x5634,
    .i2c_ctrl                   = 0x5638,
    .i2c_status                 = 0x563c,
    .i2c_data_buf               = 0x5680,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000400,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data43 = {
    .adap_nr                    = 49,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5700,
    .i2c_filter                 = 0x5704,
    .i2c_stretch                = 0x5708,
    .i2c_ext_9548_exits_flag    = 0x570c,
    .i2c_ext_9548_addr          = 0x5710,
    .i2c_ext_9548_chan          = 0x5714,
    .i2c_in_9548_chan           = 0x5718,
    .i2c_slave                  = 0x571c,
    .i2c_reg                    = 0x5720,
    .i2c_reg_len                = 0x5730,
    .i2c_data_len               = 0x5734,
    .i2c_ctrl                   = 0x5738,
    .i2c_status                 = 0x573c,
    .i2c_data_buf               = 0x5780,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00000800,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data44 = {
    .adap_nr                    = 50,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5800,
    .i2c_filter                 = 0x5804,
    .i2c_stretch                = 0x5808,
    .i2c_ext_9548_exits_flag    = 0x580c,
    .i2c_ext_9548_addr          = 0x5810,
    .i2c_ext_9548_chan          = 0x5814,
    .i2c_in_9548_chan           = 0x5818,
    .i2c_slave                  = 0x581c,
    .i2c_reg                    = 0x5820,
    .i2c_reg_len                = 0x5830,
    .i2c_data_len               = 0x5834,
    .i2c_ctrl                   = 0x5838,
    .i2c_status                 = 0x583c,
    .i2c_data_buf               = 0x5880,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00001000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data45 = {
    .adap_nr                    = 51,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5900,
    .i2c_filter                 = 0x5904,
    .i2c_stretch                = 0x5908,
    .i2c_ext_9548_exits_flag    = 0x590c,
    .i2c_ext_9548_addr          = 0x5910,
    .i2c_ext_9548_chan          = 0x5914,
    .i2c_in_9548_chan           = 0x5918,
    .i2c_slave                  = 0x591c,
    .i2c_reg                    = 0x5920,
    .i2c_reg_len                = 0x5930,
    .i2c_data_len               = 0x5934,
    .i2c_ctrl                   = 0x5938,
    .i2c_status                 = 0x593c,
    .i2c_data_buf               = 0x5980,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00002000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data46 = {
    .adap_nr                    = 52,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5a00,
    .i2c_filter                 = 0x5a04,
    .i2c_stretch                = 0x5a08,
    .i2c_ext_9548_exits_flag    = 0x5a0c,
    .i2c_ext_9548_addr          = 0x5a10,
    .i2c_ext_9548_chan          = 0x5a14,
    .i2c_in_9548_chan           = 0x5a18,
    .i2c_slave                  = 0x5a1c,
    .i2c_reg                    = 0x5a20,
    .i2c_reg_len                = 0x5a30,
    .i2c_data_len               = 0x5a34,
    .i2c_ctrl                   = 0x5a38,
    .i2c_status                 = 0x5a3c,
    .i2c_data_buf               = 0x5a80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00004000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data47 = {
    .adap_nr                    = 53,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5b00,
    .i2c_filter                 = 0x5b04,
    .i2c_stretch                = 0x5b08,
    .i2c_ext_9548_exits_flag    = 0x5b0c,
    .i2c_ext_9548_addr          = 0x5b10,
    .i2c_ext_9548_chan          = 0x5b14,
    .i2c_in_9548_chan           = 0x5b18,
    .i2c_slave                  = 0x5b1c,
    .i2c_reg                    = 0x5b20,
    .i2c_reg_len                = 0x5b30,
    .i2c_data_len               = 0x5b34,
    .i2c_ctrl                   = 0x5b38,
    .i2c_status                 = 0x5b3c,
    .i2c_data_buf               = 0x5b80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00008000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data48 = {
    .adap_nr                    = 54,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5c00,
    .i2c_filter                 = 0x5c04,
    .i2c_stretch                = 0x5c08,
    .i2c_ext_9548_exits_flag    = 0x5c0c,
    .i2c_ext_9548_addr          = 0x5c10,
    .i2c_ext_9548_chan          = 0x5c14,
    .i2c_in_9548_chan           = 0x5c18,
    .i2c_slave                  = 0x5c1c,
    .i2c_reg                    = 0x5c20,
    .i2c_reg_len                = 0x5c30,
    .i2c_data_len               = 0x5c34,
    .i2c_ctrl                   = 0x5c38,
    .i2c_status                 = 0x5c3c,
    .i2c_data_buf               = 0x5c80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00010000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data49 = {
    .adap_nr                    = 55,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5d00,
    .i2c_filter                 = 0x5d04,
    .i2c_stretch                = 0x5d08,
    .i2c_ext_9548_exits_flag    = 0x5d0c,
    .i2c_ext_9548_addr          = 0x5d10,
    .i2c_ext_9548_chan          = 0x5d14,
    .i2c_in_9548_chan           = 0x5d18,
    .i2c_slave                  = 0x5d1c,
    .i2c_reg                    = 0x5d20,
    .i2c_reg_len                = 0x5d30,
    .i2c_data_len               = 0x5d34,
    .i2c_ctrl                   = 0x5d38,
    .i2c_status                 = 0x5d3c,
    .i2c_data_buf               = 0x5d80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00020000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data50 = {
    .adap_nr                    = 56,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5e00,
    .i2c_filter                 = 0x5e04,
    .i2c_stretch                = 0x5e08,
    .i2c_ext_9548_exits_flag    = 0x5e0c,
    .i2c_ext_9548_addr          = 0x5e10,
    .i2c_ext_9548_chan          = 0x5e14,
    .i2c_in_9548_chan           = 0x5e18,
    .i2c_slave                  = 0x5e1c,
    .i2c_reg                    = 0x5e20,
    .i2c_reg_len                = 0x5e30,
    .i2c_data_len               = 0x5e34,
    .i2c_ctrl                   = 0x5e38,
    .i2c_status                 = 0x5e3c,
    .i2c_data_buf               = 0x5e80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00040000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data51 = {
    .adap_nr                    = 57,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x5f00,
    .i2c_filter                 = 0x5f04,
    .i2c_stretch                = 0x5f08,
    .i2c_ext_9548_exits_flag    = 0x5f0c,
    .i2c_ext_9548_addr          = 0x5f10,
    .i2c_ext_9548_chan          = 0x5f14,
    .i2c_in_9548_chan           = 0x5f18,
    .i2c_slave                  = 0x5f1c,
    .i2c_reg                    = 0x5f20,
    .i2c_reg_len                = 0x5f30,
    .i2c_data_len               = 0x5f34,
    .i2c_ctrl                   = 0x5f38,
    .i2c_status                 = 0x5f3c,
    .i2c_data_buf               = 0x5f80,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00080000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data52 = {
    .adap_nr                    = 58,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x6000,
    .i2c_filter                 = 0x6004,
    .i2c_stretch                = 0x6008,
    .i2c_ext_9548_exits_flag    = 0x600c,
    .i2c_ext_9548_addr          = 0x6010,
    .i2c_ext_9548_chan          = 0x6014,
    .i2c_in_9548_chan           = 0x6018,
    .i2c_slave                  = 0x601c,
    .i2c_reg                    = 0x6020,
    .i2c_reg_len                = 0x6030,
    .i2c_data_len               = 0x6034,
    .i2c_ctrl                   = 0x6038,
    .i2c_status                 = 0x603c,
    .i2c_data_buf               = 0x6080,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00100000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data53 = {
    .adap_nr                    = 59,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x6100,
    .i2c_filter                 = 0x6104,
    .i2c_stretch                = 0x6108,
    .i2c_ext_9548_exits_flag    = 0x610c,
    .i2c_ext_9548_addr          = 0x6110,
    .i2c_ext_9548_chan          = 0x6114,
    .i2c_in_9548_chan           = 0x6118,
    .i2c_slave                  = 0x611c,
    .i2c_reg                    = 0x6120,
    .i2c_reg_len                = 0x6130,
    .i2c_data_len               = 0x6134,
    .i2c_ctrl                   = 0x6138,
    .i2c_status                 = 0x613c,
    .i2c_data_buf               = 0x6180,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00200000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data54 = {
    .adap_nr                    = 60,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x6200,
    .i2c_filter                 = 0x6204,
    .i2c_stretch                = 0x6208,
    .i2c_ext_9548_exits_flag    = 0x620c,
    .i2c_ext_9548_addr          = 0x6210,
    .i2c_ext_9548_chan          = 0x6214,
    .i2c_in_9548_chan           = 0x6218,
    .i2c_slave                  = 0x621c,
    .i2c_reg                    = 0x6220,
    .i2c_reg_len                = 0x6230,
    .i2c_data_len               = 0x6234,
    .i2c_ctrl                   = 0x6238,
    .i2c_status                 = 0x623c,
    .i2c_data_buf               = 0x6280,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00400000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static fpga_i2c_bus_device_t fpga_dom_i2c_bus_device_data55 = {
    .adap_nr                    = 61,
    .i2c_timeout                = 3000,
    .i2c_scale                  = 0x6300,
    .i2c_filter                 = 0x6304,
    .i2c_stretch                = 0x6308,
    .i2c_ext_9548_exits_flag    = 0x630c,
    .i2c_ext_9548_addr          = 0x6310,
    .i2c_ext_9548_chan          = 0x6314,
    .i2c_in_9548_chan           = 0x6318,
    .i2c_slave                  = 0x631c,
    .i2c_reg                    = 0x6320,
    .i2c_reg_len                = 0x6330,
    .i2c_data_len               = 0x6334,
    .i2c_ctrl                   = 0x6338,
    .i2c_status                 = 0x633c,
    .i2c_data_buf               = 0x6380,
    .dev_name                   = "/dev/fpga0",
    .i2c_scale_value            = 0x4e,
    .i2c_filter_value           = 0x7c,
    .i2c_stretch_value          = 0x7c,
    .i2c_func_mode              = 3,
    .i2c_adap_reset_flag        = 1,
    .i2c_reset_addr             = 0x7c,
    .i2c_reset_on               = 0x00800000,
    .i2c_reset_off              = 0x00000000,
    .i2c_rst_delay_b            = 0,
    .i2c_rst_delay              = 1,
    .i2c_rst_delay_a            = 1,
};

static void wb_fpga_i2c_bus_device_release(struct device *dev)
{
    return;
}

static struct platform_device fpga_i2c_bus_device[] = {
    {
        .name   = "wb-fpga-i2c",
        .id = 1,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 2,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 3,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data2,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 4,
        .dev    = {
            .platform_data  = &fpga_i2c_bus_device_data3,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 5,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data0,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 6,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data1,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 7,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data2,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 8,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data3,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 9,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data4,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 10,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data5,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 11,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data6,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 12,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data7,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 13,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data8,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 14,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data9,
            .release = wb_fpga_i2c_bus_device_release,
        }
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 15,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data10,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 16,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data11,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 17,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data12,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 18,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data13,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 19,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data14,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 20,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data15,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 21,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data16,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 22,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data17,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 23,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data18,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 24,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data19,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 25,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data20,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 26,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data21,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 27,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data22,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 28,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data23,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 29,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data24,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 30,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data25,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 31,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data26,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 32,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data27,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 33,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data28,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 34,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data29,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 35,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data30,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 36,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data31,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 37,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data32,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 38,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data33,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 39,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data34,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 40,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data35,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 41,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data36,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 42,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data37,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 43,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data38,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 44,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data39,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 45,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data40,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 46,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data41,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 47,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data42,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 48,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data43,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 49,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data44,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 50,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data45,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 51,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data46,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 52,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data47,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 53,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data48,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 54,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data49,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 55,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data50,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 56,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data51,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 57,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data52,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 58,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data53,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 59,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data54,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
    {
        .name   = "wb-fpga-i2c",
        .id = 60,
        .dev    = {
            .platform_data  = &fpga_dom_i2c_bus_device_data55,
            .release = wb_fpga_i2c_bus_device_release,
        },
    },
};

static int __init wb_fpga_i2c_bus_device_init(void)
{
    int i;
    int ret = 0;
    fpga_i2c_bus_device_t *fpga_i2c_bus_device_data;

    WB_FPGA_I2C_DEBUG_VERBOSE("enter!\n");
    for (i = 0; i < ARRAY_SIZE(fpga_i2c_bus_device); i++) {
        fpga_i2c_bus_device_data = fpga_i2c_bus_device[i].dev.platform_data;
        ret = platform_device_register(&fpga_i2c_bus_device[i]);
        if (ret < 0) {
            fpga_i2c_bus_device_data->device_flag = -1; /* device register failed, set flag -1 */
            printk(KERN_ERR "wb-fpga-i2c.%d register failed!\n", i + 1);
        } else {
            fpga_i2c_bus_device_data->device_flag = 0; /* device register suucess, set flag 0 */
        }
    }
    return 0;
}

static void __exit wb_fpga_i2c_bus_device_exit(void)
{
    int i;
    fpga_i2c_bus_device_t *fpga_i2c_bus_device_data;

    WB_FPGA_I2C_DEBUG_VERBOSE("enter!\n");
    for (i = ARRAY_SIZE(fpga_i2c_bus_device) - 1; i >= 0; i--) {
        fpga_i2c_bus_device_data = fpga_i2c_bus_device[i].dev.platform_data;
        if (fpga_i2c_bus_device_data->device_flag == 0) { /* device register success, need unregister */
            platform_device_unregister(&fpga_i2c_bus_device[i]);
        }
    }
}

module_init(wb_fpga_i2c_bus_device_init);
module_exit(wb_fpga_i2c_bus_device_exit);
MODULE_DESCRIPTION("FPGA I2C Devices");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("support");
